package com.ggdog.blog.DAO;

import com.ggdog.blog.POJO.Project;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProjectDAO {

    @Select("insert into Project(projectName,projectDescription,projectUrl,projectImageUrl,projectGitUrl,projectType,createTime) values (#{projectName},#{projectDescription},#{projectUrl},#{projectImageUrl},#{projectGitUrl},#{projectType},now())")
    int addProject(String projectName,
                   String projectDescription,
                   String projectUrl,
                   String projectImageUrl,
                   String projectGitUrl,
                   String projectType);
    @Select("select * from Project")
    List<Project> getAllProject();
}
